home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Performance Co-Pilot 1.3
/
SGI Performance Co-Pilot 1.3.iso
/
dist
/
pcp.idb
/
usr
/
share
/
catman
/
u_man
/
cat1
/
cron.pmdaily.z
/
cron.pmdaily
Wrap
Text File
|
1997-04-03
|
12KB
|
198 lines
CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111)))) CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111))))
NNNNAAAAMMMMEEEE
ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy, ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk, ccccrrrroooonnnn....ppppmmmmllllooooggggmmmmeeeerrrrggggeeee - administration of
Performance Co-Pilot archive log files
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy [----cccc _c_o_n_t_r_o_l] [----kkkk _h_o_w_l_o_n_g] [----ssss _s_i_z_e]
////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk [----cccc _c_o_n_t_r_o_l]
////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ccccrrrroooonnnn....ppppmmmmllllooooggggmmmmeeeerrrrggggeeee [----ffff] [_i_n_p_u_t-_b_a_s_e_n_a_m_e ... _o_u_t_p_u_t-_n_a_m_e]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
This series of shell scripts and associated control files may be used to
create a customized regime of administration and management for
Performance Co-Pilot (PCP) archive log files.
ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy is intended to be run once per day, preferably in the early
morning, as soon after midnight as practicable. Its task is to aggregate
and rotate one or more sets of PCP archives. After some period, old PCP
archives are discarded. This period is 14 days by default, but may be
changed using the ----kkkk option. Two special values are recognized for the
period (_h_o_w_l_o_n_g), namely 0000 to keep no archives beyond the current one,
and ffffoooorrrreeeevvvveeeerrrr to prevent any archives being discarded.
In addition, if the the PCP ``notices'' file (/_v_a_r/_a_d_m/_p_c_p_l_o_g/_N_O_T_I_C_E_S) is
larger than 20480 bytes, ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy will rename the file with a
``.old'' suffix, and start a new ``notices'' file. The rotate threshold
may be changed from 20480 to _s_i_z_e bytes using the ----ssss option.
ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk may be run at any time, and is intended to check that the
desired set of ppppmmmmllllooooggggggggeeeerrrr(1) processes are running, and if not to re-launch
any failed loggers.
ccccrrrroooonnnn....ppppmmmmllllooooggggmmmmeeeerrrrggggeeee is a wrapper script for ppppmmmmllllooooggggmmmmeeeerrrrggggeeee(1) that merges all of
the archive logs matching the _i_n_p_u_t-_b_a_s_e_n_a_m_e arguments, and creates a new
archive using _o_u_t_p_u_t-_n_a_m_e as the base name for the physical files that
constitute an archive log. The _i_n_p_u_t-_b_a_s_e_n_a_m_e arguments may contain meta
characters in the style of sssshhhh(1). If specified, the ----ffff option causes all
of the input files to be removed once the output archive has been
created.
ccccrrrroooonnnn....ppppmmmmllllooooggggmmmmeeeerrrrggggeeee is used by ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy.
Both ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy and ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk are controlled by a PCP logger control
file that specifies the parameters of the archive sets to be managed.
The default control file is /_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_o_n_t_r_o_l, but an
alternate may be specified using the ----cccc option.
The control file should be customized according to the following rules.
1. Lines beginning with a ``#'' are comments.
2. Lines beginning with a ``$'' are interpreted as sssshhhh(1) commands, and
all text following the ``$'' will be eval'ed by the script reading
the control file. This is particularly useful to set and export
PPPPaaaaggggeeee 1111
CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111)))) CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111))))
variables into the environment of the administrative scripts, e.g.
$ PMCD_CONNECT_TIMEOUT=20; export PMCD_CONNECT_TIMEOUT
3. There should be one line in the control file for each archive set.
At any one time, there will be one ppppmmmmllllooooggggggggeeeerrrr process executing on the
local host for each archive set.
4. Fields within a line of the control file are separated by one or
more spaces or tabs.
5. The _f_i_r_s_t field is the name of the host that is the source of the
performance metrics for this archive set.
6. The _s_e_c_o_n_d field indicates if this is a _p_r_i_m_a_r_y ppppmmmmllllooooggggggggeeeerrrr instance
(yyyy) or not (nnnn). Since the primary logger must run on the local
host, and there may be at most one primary logger for a particular
host, this field can be yyyy for at most one archive set, in which case
the host name must be the name of the local host.
7. The _t_h_i_r_d field indicates if this ppppmmmmllllooooggggggggeeeerrrr instance needs to be
started under the control of ppppmmmmssssoooocccckkkkssss(1) to connect to a ppppmmmmccccdddd through
a firewall (yyyy or nnnn).
8. The _f_o_u_r_t_h field is a directory name. All files associated with
this archive set will be created in this directory, and this will be
the current directory for the execution of any programs required in
the maintenance of this archive set. A useful convention is that
primary logger archives for the local host with hostname _m_y_h_o_s_t are
maintained in the directory /_v_a_r/_a_d_m/_p_c_p_l_o_g/_m_y_h_o_s_t (this is where
the default ppppmmmmllllooooggggggggeeeerrrr start-up script in ////eeeettttcccc////iiiinnnniiiitttt....dddd////ppppccccpppp will create
the archives), while archives for the remote host _m_u_m_b_l_e are
maintained in /_v_a_r/_a_d_m/_p_c_p_l_o_g/_m_u_m_b_l_e.
9. All other fields are interpreted as arguments to be passed to
ppppmmmmllllooooggggggggeeeerrrr(1) and/or ppppmmmmnnnneeeewwwwlllloooogggg(1). Most typically this would be the ----cccc
option.
The following sample control lines specify a primary logger on the local
host (_b_o_z_o), and a non-primary logger to collect and log performance
metrics from the host _b_o_i_n_g.
bozo y n /var/adm/pcplog/bozo -c config.default
boing n n /var/adm/pcplog/boing -c ./pmlogger.config
Typical ccccrrrroooonnnnttttaaaabbbb(5) entries for periodic execution of ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy and
ccccrrrroooonnnn....ppppmmmmcccchhhheeeecccckkkk are given in /_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_r_o_n_t_a_b and shown
below. Due to the file permissions involved, these should be added to
the _c_r_o_n_t_a_b for root if automated PCP archive log maintenance is desired.
# daily processing of archive logs
10 0 * * * /usr/pcp/bin/cron.pmdaily
# every 30 minutes, check pmlogger instances are running
25,55 * * * * /usr/pcp/bin/cron.pmcheck
The script ////uuuussssrrrr////ppppccccpppp////bbbbiiiinnnn////ccccrrrroooonnnn....ppppmmmmddddaaaaiiiillllyyyy could be copied and modified to
implement a site-specific procedure for end-of-week and/or end-of-month
management for a set of PCP archives.
PPPPaaaaggggeeee 2222
CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111)))) CCCCRRRROOOONNNN....PPPPMMMMDDDDAAAAIIIILLLLYYYY((((1111))))
FFFFIIIILLLLEEEESSSS
/_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_o_n_t_r_o_l
the PCP logger control file
/_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_r_o_n_t_a_b
sample crontab for automated script execution
by root
/_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_o_n_f_i_g._d_e_f_a_u_l_t
default ppppmmmmllllooooggggggggeeeerrrr configuration file for the
local primary logger
/_v_a_r/_p_c_p/_c_o_n_f_i_g/_p_m_l_o_g_g_e_r/_c_o_n_f_i_g.*
other ppppmmmmllllooooggggggggeeeerrrr configuration files suited for
particular PCP monitoring tools, add-on
products and application environments
/_v_a_r/_a_d_m/_p_c_p_l_o_g/_h_o_s_t_n_a_m_e default location for archives of performance
information collected from the host _h_o_s_t_n_a_m_e
/_v_a_r/_a_d_m/_p_c_p_l_o_g/_N_O_T_I_C_E_S PCP ``notices'' file used by ppppmmmmiiiieeee(1) and
friends
SSSSEEEEEEEE AAAALLLLSSSSOOOO
ccccrrrroooonnnn(1), ppppmmmmllllcccc(1), ppppmmmmllllooooggggggggeeeerrrr(1), ppppmmmmllllooooggggmmmmeeeerrrrggggeeee(1), ppppmmmmnnnneeeewwwwlllloooogggg(1) and ppppmmmmssssoooocccckkkkssss(1).
PPPPaaaaggggeeee 3333